﻿using TCommon;

namespace TCommunication.Interface;
/// <summary>
/// 所有通讯类的基接口
/// </summary>
public interface ICommunication : IDisposable
{
    /// <summary>
    /// 是否连接
    /// </summary>
    public bool IsConnected { get; }
    /// <summary>
    /// 连接
    /// </summary>
    /// <returns></returns>
    OperateResult Connect();
    /// <summary>
    /// 断开连接
    /// </summary>
    /// <returns></returns>
    OperateResult DisConnect();
}